<me:UIRQI03 x:Class="WPFExcelReport.TRWGWB08"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM" 
                    xmlns:BW="clr-namespace:WPFExcelReport;assembly=TWBBEW" 
                    xmlns:WB="clr-namespace:WPFExcelReport;assembly=TWBDAT" 
                   xmlns:AM="clr-namespace:WPFExcelReport;assembly=TAMSTAMM"  
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR" 
                   x:Name="TV" 
                    Loaded="Window_Loaded"
     >
    <me:UIWBBST.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter x:Key="pnum"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIWBBST.Resources>
    <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
        <StackPanel>
                <WrapPanel>
                   
                    <Button   Click="QueryCommand" Height="40"  Margin="20,0,0,0" Width="Auto"  
                              VerticalAlignment="Center" FontSize="18"  
                              Content="{Binding Source={Localization:Translate Word=坯布卷号}}"/>
                    <ex:TXT72  Grid.Column="1" FontSize="18"  Foreground="Red"   MaxLength="12"
                                      KeyUp="Query_KeyUp"
                                      Text="{Binding STKNR,ElementName=TV}" Width="160" />
                 
                    <DR:TDRAUFTR  Grid.Column="0" Name="cDR" DocType="{Binding PRTYPE,ElementName=TV}"
                             PrintType="DirectPrint" />
                    <Button  Grid.Column="1"   Click="PrintLBCommand" Height="40" Margin="5,0,0,0" Width="Auto" Content="{Binding Source={Localization:Translate Word=标签}}" />
                </WrapPanel>
                <WrapPanel HorizontalAlignment="Center">
                    <TextBlock Text="{Binding Source={Localization:Translate Word=重量:}}"  Margin="20,0,0,20"
                           VerticalAlignment="Center" FontSize="18"/>
                <ex:TXT72  Text="{Binding CKG,Converter={StaticResource d1000},ElementName=TV}" Width="180"/>
                <TextBlock Text="{Binding Source={Localization:Translate Word=手动重量:}}"  Margin="20,0,0,20"
                           VerticalAlignment="Center" FontSize="18"/>
                <ex:TXT72  Text="{Binding WBBSGEW,Converter={StaticResource d1000}}" Width="180"/>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"  
                   VerticalAlignment="Top"  
                   FontSize="16"
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   IsReadOnly="True"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"     
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                   x:Name="dlgMaster"  
                   MaxHeight="200"
                   RowDetailsVisibilityMode="Visible"  Margin="0,0,0,0"
                    >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=WBBART}" Header="{Binding Source={Localization:Translate Word=品种}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBBVAR}" Header="{Binding Source={Localization:Translate Word=版本}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBBFARBE}" Header="{Binding Source={Localization:Translate Word=色号}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBBAUFKRS}"    Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBBAUFLFD,Converter={StaticResource pnum}}" Header="{Binding Source={Localization:Translate Word=单}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBBAUFPOS,Converter={StaticResource pnum}}"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBBSTKNR}" Header="{Binding Source={Localization:Translate Word=布卷}}"  Width="Auto" /> 
                        <DataGridTextColumn Binding="{Binding Path=WBBLB}" Header="{Binding Source={Localization:Translate Word=位置}}"  Width="Auto" /> 
                        <DataGridTextColumn Binding="{Binding Path=WBBISTKLG,Converter={StaticResource d1000}}" Header="{Binding Source={Localization:Translate Word=长度}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBBSGEW,Converter={StaticResource d1000}}" Header="{Binding Source={Localization:Translate Word=重量}}"  Width="Auto" />                        
                        <DataGridTextColumn Binding="{Binding Path=WBBDPART,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=批次}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBBBEM,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=备注}}"  Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid  >
            </Grid>
   
</me:UIRQI03>
